KISSY.use("node",function(S,Node){ 
var start = KISSY.DOM.get('.js-start');
var end = KISSY.DOM.get('.js-end');
	TimeSet(start);
	TimeSet(end);
	function TimeSet(input,addday,limit){
	KISSY.use('calendar',function(S,Calendar){
    // use Calendar

		var Calendar = KISSY.Calendar;
		var date = new Date();
		var param;
		if(limit=='max'){
		param = {popup: true, maxDate: date.setDate(date.getDate()+addday),showTime:true};
		}else{
		param = {popup: true, minDate: date.setDate(date.getDate()+addday),showTime:true};
		}
		var cal = new Calendar(input,param);
		cal.on('timeSelect', function (e) {
			var selectDate = new Date(e.date);
			var m = selectDate.getMonth()+1;
			var d = selectDate.getDate();
			var h = selectDate.getHours();
			var i = selectDate.getMinutes();
			var s = selectDate.getSeconds();
			m = m<10?'0'+m:m;
			d = d<10?'0'+d:d;
			h = h<10?'0'+h:h;
			i = i<10?'0'+i:i;
			s = s<10?'0'+s:s;
			
			var t = selectDate.getFullYear() + "-" + m + "-" + d;
			input.value = t;
			cal.hide();
		});
	});
}
});